<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: arm_compute::utils::cast Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Compute Library
   &#160;<span id="projectnumber">18.05</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
      <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.xhtml"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="namespaces.xhtml"><span>Namespace&#160;List</span></a></li>
      <li><a href="namespacemembers.xhtml"><span>Namespace&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('namespacearm__compute_1_1utils_1_1cast.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">arm_compute::utils::cast Namespace Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a9eeb4390c7aab75d31ccc9ddc8d93975"><td class="memTemplParams" colspan="2">template&lt;typename Target , typename Source &gt; </td></tr>
<tr class="memitem:a9eeb4390c7aab75d31ccc9ddc8d93975"><td class="memTemplItemLeft" align="right" valign="top">Target&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1utils_1_1cast.xhtml#a9eeb4390c7aab75d31ccc9ddc8d93975">polymorphic_cast</a> (Source *v)</td></tr>
<tr class="memdesc:a9eeb4390c7aab75d31ccc9ddc8d93975"><td class="mdescLeft">&#160;</td><td class="mdescRight">Polymorphic cast between two types.  <a href="#a9eeb4390c7aab75d31ccc9ddc8d93975">More...</a><br /></td></tr>
<tr class="separator:a9eeb4390c7aab75d31ccc9ddc8d93975"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5484e8b514faf2ab4235b2aa86375c0a"><td class="memTemplParams" colspan="2">template&lt;typename Target , typename Source &gt; </td></tr>
<tr class="memitem:a5484e8b514faf2ab4235b2aa86375c0a"><td class="memTemplItemLeft" align="right" valign="top">Target&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1utils_1_1cast.xhtml#a5484e8b514faf2ab4235b2aa86375c0a">polymorphic_downcast</a> (Source *v)</td></tr>
<tr class="memdesc:a5484e8b514faf2ab4235b2aa86375c0a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Polymorphic down cast between two types.  <a href="#a5484e8b514faf2ab4235b2aa86375c0a">More...</a><br /></td></tr>
<tr class="separator:a5484e8b514faf2ab4235b2aa86375c0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a9eeb4390c7aab75d31ccc9ddc8d93975"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Target arm_compute::utils::cast::polymorphic_cast </td>
          <td>(</td>
          <td class="paramtype">Source *&#160;</td>
          <td class="paramname"><em>v</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Polymorphic cast between two types. </p>
<dl class="section warning"><dt>Warning</dt><dd>Will throw an exception if cast cannot take place</dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">Target</td><td>Target to cast type </td></tr>
    <tr><td class="paramname">Source</td><td>Source from cast type</td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>Value to cast</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The casted type </dd></dl>

<p>Definition at line <a class="el" href="_cast_8h_source.xhtml#l00047">47</a> of file <a class="el" href="_cast_8h_source.xhtml">Cast.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;{</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keywordflow">if</span>(dynamic_cast&lt;Target&gt;(v) == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    {</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        <span class="keywordflow">throw</span> std::bad_cast();</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    }</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><a class="code" href="namespacearm__compute_1_1graph.xhtml#a31488d29805a596498c0234ae392d35d">Target</a><span class="keyword">&gt;</span>(v);</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1graph_xhtml_a31488d29805a596498c0234ae392d35d"><div class="ttname"><a href="namespacearm__compute_1_1graph.xhtml#a31488d29805a596498c0234ae392d35d">arm_compute::graph::Target</a></div><div class="ttdeci">Target</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2graph_2_types_8h_source.xhtml#l00084">Types.h:84</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a5484e8b514faf2ab4235b2aa86375c0a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Target arm_compute::utils::cast::polymorphic_downcast </td>
          <td>(</td>
          <td class="paramtype">Source *&#160;</td>
          <td class="paramname"><em>v</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Polymorphic down cast between two types. </p>
<dl class="section warning"><dt>Warning</dt><dd>Will assert if cannot take place</dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">Target</td><td>Target to cast type </td></tr>
    <tr><td class="paramname">Source</td><td>Source from cast type</td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>Value to cast</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The casted type </dd></dl>

<p>Definition at line <a class="el" href="_cast_8h_source.xhtml#l00068">68</a> of file <a class="el" href="_cast_8h_source.xhtml">Cast.h</a>.</p>

<p>References <a class="el" href="_error_8h_source.xhtml#l00328">ARM_COMPUTE_ERROR_ON</a>.</p>
<div class="fragment"><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;{</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(dynamic_cast&lt;Target&gt;(v) != static_cast&lt;Target&gt;(v));</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><a class="code" href="namespacearm__compute_1_1graph.xhtml#a31488d29805a596498c0234ae392d35d">Target</a><span class="keyword">&gt;</span>(v);</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;}</div><div class="ttc" id="_error_8h_xhtml_a54a6080c9f4df1f908e57a9bbb46f5da"><div class="ttname"><a href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON(cond)</div><div class="ttdoc">If the condition is true then an error message is printed and an exception thrown. </div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00328">Error.h:328</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1graph_xhtml_a31488d29805a596498c0234ae392d35d"><div class="ttname"><a href="namespacearm__compute_1_1graph.xhtml#a31488d29805a596498c0234ae392d35d">arm_compute::graph::Target</a></div><div class="ttdeci">Target</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2graph_2_types_8h_source.xhtml#l00084">Types.h:84</a></div></div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1utils.xhtml">utils</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1utils_1_1cast.xhtml">cast</a></li>
    <li class="footer">Generated on Wed May 23 2018 11:36:45 for Compute Library by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
